package com.ls.lscrm.web.controller;

import com.ls.lscrm.web.model.MonthIncome;
import com.ls.lscrm.web.service.ICourseOrderService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

//数据分析
@Controller
@RequestMapping("/dataanalysis")
public class DataAnalysisController {
    @Resource
    ICourseOrderService service;

    @RequestMapping("/income")
    public String income() {
        return "dataanalysis/income";
    }

    @RequestMapping("/monthIncomes")
    @ResponseBody
    public List<MonthIncome> monthIncomes() {
        List<MonthIncome> list = service.getMonthIncomes();
        return list;
    }
}
